<html>
<head>
    @include('v1.common.meta')
    <link rel="stylesheet" href="{{elixir('css/basicdata.css')}}">
</head>
<body>
<div class="yjs-grid">
    <div class="yjs-grid-box">
        <div class="layui-tab">
            @if(Auth::check())
                <div class="layui-container">
                    @if($view==='addData')
                        {{--新增图文视图--}}
                        <div class="layui-row">
                            <div class="layui-col-md12">
                                <fieldset class="layui-elem-field">
                                    <legend>新增迎新日程信息</legend>
                                    <div class="layui-field-box">
                                        <div class="layui-row hidden-tips">
                                            <div class="layui-col-md12">
                                                <blockquote class="layui-elem-quote">
                                                    温馨提示：查看数据时，所有表单项均不可修改。
                                                </blockquote>
                                            </div>
                                        </div>

                                        <div class="layui-form layui-form-pane" name="timetableItemForm"
                                             action="javascript:;" method="POST">
                                            <input type="hidden" name="viewType" value="{{$view}}">
                                            <div class="layui-row">
                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label" style="width: 160px"><i
                                                                    class="layui-icon">&#xe605;</i>日程活动代码</label>
                                                        <div class="layui-input-inline">
                                                            <input type="text" id="code" name="code"
                                                                   lay-verify="required"
                                                                   placeholder="请输入日程活动代码"
                                                                   class="layui-input">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label" style="width: 160px"><i
                                                                    class="layui-icon">&#xe605;</i>日程活动名称</label>
                                                        <div class="layui-input-inline">
                                                            <input type="text" id="name" name="name"
                                                                   lay-verify="required"
                                                                   placeholder="请输入日程活动名称"
                                                                   class="layui-input">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label" style="width: 160px"><i
                                                                    class="layui-icon">&#xe605;</i>日程活动类别</label>
                                                        <div class="layui-input-inline">
															<!--
                                                            <input type="text" id="category" name="category"
                                                                   lay-verify="required"
                                                                   placeholder="请输入日程活动类别"
                                                                   class="layui-input">
															-->
                                                                <select name="category" id="category"> 
																		<option value="">请选择</option>
                                                                        <option value="生活用品">生活用品</option> 
                                                                        <option value="新生教材">新生教材</option> 
                                                                        <option value="校服清单">校服清单</option> 
                                                                        <option value="费用类别">费用类别</option> 
                                                                </select> 
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-row">
                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label" style="width: 150px"><i
                                                                    class="layui-icon">&#xe605;</i>日期</label>
                                                        <div class="layui-input-inline">
                                                            <textarea type="text" id="time" name="time"
                                                                      lay-verify="required"
                                                                      class="layui-textarea"></textarea>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label" style="width: 150px"><i
                                                                    class="layui-icon">&#xe605;</i>具体时间要求</label>
                                                        <div class="layui-input-inline">
                                                            <textarea type="text" id="detail" name="detail"
                                                                      lay-verify="required"
                                                                      class="layui-textarea"></textarea>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="layui-row">
                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label" style="width: 150px"><i
                                                                    class="layui-icon">&#xe605;</i>地点</label>
                                                        <div class="layui-input-inline">
                                                            <textarea type="text" id="address" name="address"
                                                                      lay-verify="required"
                                                                      class="layui-textarea"></textarea>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label" style="width: 150px"><i
                                                                    class="layui-icon">&#xe605;</i>接待单位或人员</label>
                                                        <div class="layui-input-inline">
                                                            <textarea type="text" id="reception_person" name="reception_person"
                                                                      class="layui-textarea"></textarea>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>


                                            <div class="layui-row">
                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label" style="width: 150px"><i
                                                                    class="layui-icon">&#xe605;</i>注意事项</label>
                                                        <div class="layui-input-inline">
                                                            <textarea type="text" id="attention" name="attention"
                                                                      class="layui-textarea"></textarea>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="layui-col-md6">
                                                    <label class="layui-form-label" style="width: 150px"><i
                                                                class="layui-icon">&#xe605;</i>显示顺序</label>
                                                    <div class="layui-input-inline">
                                                        <input type="text" id="show_order" name="show_order"
                                                               lay-verify="required|order"
                                                               placeholder="请输入显示顺序"
                                                               class="layui-input">
                                                    </div>
                                                </div>
                                            </div>
											
<!--											<div class="layui-row">
													<div class="layui-form-item" pane="">
														<label class="layui-form-label">复用信息</label>
														<div class="layui-input-block">
															@foreach($processes as $process)
																<input type="checkbox"  name={{$process['code']}} lay-skin="primary" checked title={{$process['name']}} >
															@endforeach
														</div>
													</div>
                                            </div>-->
				
											
                                            <div class="layui-row">
                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label">验证码</label>
                                                        <div class="layui-input-block">
                                                            <input type="text" name="captcha" maxlength="4"
                                                                   lay-verify="required"
                                                                   placeholder="请输入图片验证码" autocomplete="off"
                                                                   class="layui-input">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="layui-col-md3">
                                                    <div class="layui-form-item">
                                                        <img class="getLVcode" src="{{ captcha_src('mini') }}"
                                                             width="70px"
                                                             height="34px" style="border: 1px solid green;"/>
                                                        <div class="layui-form-mid layui-word-aux">
                                                            点击图片刷新验证码
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="layui-col-md3">
                                                    {{--隐藏提交--}}
                                                    <button id="toolbarSubmit" type="submit" class="layui-btn"
                                                            lay-filter="toolbarEvent" lay-submit style="display: none;">
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </fieldset>
                            </div>
                        </div>
                    @elseif($view==='viewData')
                        <div class="layui-row">
                            <div class="layui-col-md12">
                                <fieldset class="layui-elem-field">
                                    <legend>查看【{{$timetable['name']}}】信息</legend>
                                    <div class="layui-field-box">
                                        <div class="layui-row hidden-tips">
                                            <div class="layui-col-md12">
                                                <blockquote class="layui-elem-quote">
                                                    温馨提示：查看数据时，所有表单项均不可修改。
                                                </blockquote>
                                            </div>
                                        </div>
                                        <div class="layui-form layui-form-pane">
                                            <div class="layui-row">
                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label" style="width: 120px">日程活动代码</label>
                                                        <div class="layui-input-inline">
                                                            <input type="text" value="{{$timetable['code']}}" id="edit_code"
                                                                   class="layui-input">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label" style="width: 120px">日程活动名称</label>
                                                        <div class="layui-input-inline">
                                                            <input type="text" value="{{$timetable['name']}}" id="edit_name"
                                                                   class="layui-input">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label" style="width: 120px">日程活动类别</label>
                                                        <div class="layui-input-inline">
                                                            <div class="layui-input-inline">
                                                                <select name="category" id="edit_category"> 
																		@if($timetable['category'] == '')
																			<option value="" selected="selected">请选择</option>
																			<option value="生活用品">生活用品</option> 
																			<option value="新生教材">新生教材</option> 
																			<option value="校服清单">校服清单</option> 
																			<option value="费用类别">费用类别</option> 
																		@elseif($timetable['category'] == '生活用品')
																			<option value="">请选择</option>
																			<option value="生活用品" selected="selected">生活用品</option> 
																			<option value="新生教材">新生教材</option> 
																			<option value="校服清单">校服清单</option> 
																			<option value="费用类别">费用类别</option> 
																		@elseif($timetable['category'] == '新生教材')
																			<option value="">请选择</option>
																			<option value="生活用品">生活用品</option> 
																			<option value="新生教材" selected="selected">新生教材</option> 
																			<option value="校服清单">校服清单</option> 
																			<option value="费用类别">费用类别</option> 
																		@elseif($timetable['category'] == '校服清单')
																			<option value="">请选择</option>
																			<option value="生活用品">生活用品</option> 
																			<option value="新生教材">新生教材</option> 
																			<option value="校服清单" selected="selected">校服清单</option> 
																			<option value="费用类别">费用类别</option> 
																		@elseif($timetable['category'] == '费用类别')
																			<option value="">请选择</option>
																			<option value="生活用品">生活用品</option> 
																			<option value="新生教材">新生教材</option> 
																			<option value="校服清单">校服清单</option> 
																			<option value="费用类别" selected="selected">费用类别</option> 
																		@endif
                                                                </select> 
                                                        </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-row">
                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label">日期</label>
                                                        <div class="layui-input-inline">
                                                            <input type="text" value="{{$timetable['time']}}"
                                                                   id="edit_time" class="layui-input">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label" style="width: 120px">具体时间要求</label>
                                                        <div class="layui-input-inline">
                                                            {{--<input type="text" value="{{$timetable['detail']}}"--}}
                                                                   {{--disabled class="layui-input">--}}
                                                            <textarea id="edit_detail"
                                                                      class="layui-textarea">{{$timetable['detail']}}</textarea>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-row">
                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label">地点</label>
                                                        <div class="layui-input-inline">
                                                            {{--<input type="text" value="{{$timetable['address']}}"--}}
                                                                   {{--disabled class="layui-input">--}}
                                                            <textarea id="edit_address"
                                                                      class="layui-textarea">{{$timetable['address']}}</textarea>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label" style="width: 130px">接待单位或人员</label>
                                                        <div class="layui-input-inline">
                                                            <input type="text" value="{{$timetable['reception_person']}}"
                                                                   id="edit_reception_person" class="layui-input">
                                                        </div>
                                                    </div>
                                                </div>

                                            </div>
                                            <div class="layui-row">
                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label">注意事项</label>
                                                        <div class="layui-input-inline">
                                                            {{--<input type="text" value="{{$timetable['attention']}}"--}}
                                                                   {{--disabled class="layui-input">--}}
                                                            <textarea id="edit_attention"
                                                                      class="layui-textarea">{{$timetable['attention']}}</textarea>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label"> 关联信息</label>
                                                        <div class="layui-input-inline">
                                                            <input type="text" value="{{$timetable['relate_information']}}"
                                                                   id="edit_relate_information" class="layui-input">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="layui-row">
                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label">创建时间</label>
                                                        <div class="layui-input-inline">
                                                            <input type="text" value="{{$timetable['created_at']}}"
                                                                   id="edit_created_at" class="layui-input">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="layui-col-md6">
                                                    <div class="layui-form-item">
                                                        <label class="layui-form-label">更新时间</label>
                                                        <div class="layui-input-inline">
                                                            <input type="text" value="{{$timetable['updated_at']}}"
                                                                   id="edit_updated_at" class="layui-input">
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </fieldset>
                            </div>
                        </div>
                    @else
                        {{--视图类型不正确--}}
                        <div class="layui-row">
                            <div class="layui-col-md12">
                                <blockquote class="layui-elem-quote-error">
                                    友情提示：视图类型不正确，无法支持后续操作。
                                </blockquote>
                            </div>
                        </div>
                    @endif
                </div>
            @else
                <div class="layui-container">
                    <div class="layui-row">
                        <div class="layui-col-md12">
                            <blockquote class="layui-elem-quote-error">
                                友情提示：该功能只面向已成功登录系统，并具有相应权限的用户可用。
                            </blockquote>
                        </div>
                    </div>
                </div>
            @endif
        </div>
    </div>
</div>

<style>
.layui-form-checkbox span{
	height:20px
}

</style>




@include('v1.common.js')
<script src="{{elixir('js/timetableItem.js')}}"></script>
</body>
<script type="text/html">
    <input type="hidden" id="rspStatus" value="">
    <input type="hidden" id="rspMsg" value="">
</script>
</html>